<?php

	class EbHTMLToolkit
	{
		static public function newSelectTag($dataProvider,$name = '',$value = null,$valueField = 'value',$labelField = 'label')
		{
			$buffer = '';
			
			foreach ($dataProvider AS $item)
			{
				$buffer .= '<option '.($value == $item->$valueField ? 'selected="true"' : "").' value="'.$item->$valueField.'">'.$item->$labelField.'</option>';
			}
			
			return '<select name="'.$name.'">'.$buffer.'</select>';
		}
	}